// 导入静态路由
import { constantRoutes } from '@/router'

export default {
  // 避免冲突命名空间
  namespaced: true,
  state: {
    // 菜单数据
    menuList: []
  },
  mutations: {
    setMenuList (state, asyncRoutes) {
      // 将动态路由和静态路由组合起来
      state.menuList = [...constantRoutes, ...asyncRoutes]
    }
  }
}
